package tomcat;

import java.io.IOException;
import java.net.Socket;
//在 RequestHandler 类中实现线程的具体任务处理逻辑。

public class RequestHandler implements Runnable {
    private final Socket socket;

    public RequestHandler(Socket socket) {
        this.socket = socket;
    }

    @Override
    public void run() {
        try {
            // 处理客户端请求
        } catch (Exception e) {
            // log error
        } finally {
            try {
                socket.close();
            } catch (IOException e) {
                // log error
            }
        }
    }
}